package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZcUsersMapper;
import com.ruoyi.system.domain.ZcUsers;
import com.ruoyi.system.service.IZcUsersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 租车用户Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-03
 */
@Service
public class ZcUsersServiceImpl extends ServiceImpl<ZcUsersMapper, ZcUsers> implements IZcUsersService
{
    @Autowired
    private ZcUsersMapper zcUsersMapper;

    /**
     * 查询租车用户
     *
     * @param userId 租车用户主键
     * @return 租车用户
     */
    @Override
    public ZcUsers selectZcUsersByUserId(Long userId)
    {
        return zcUsersMapper.selectZcUsersByUserId(userId);
    }

    /**
     * 查询租车用户列表
     *
     * @param zcUsers 租车用户
     * @return 租车用户
     */
    @Override
    public List<ZcUsers> selectZcUsersList(ZcUsers zcUsers)
    {
        return zcUsersMapper.selectZcUsersList(zcUsers);
    }

    /**
     * 新增租车用户
     *
     * @param zcUsers 租车用户
     * @return 结果
     */
    @Override
    public int insertZcUsers(ZcUsers zcUsers)
    {
        return zcUsersMapper.insertZcUsers(zcUsers);
    }

    /**
     * 修改租车用户
     *
     * @param zcUsers 租车用户
     * @return 结果
     */
    @Override
    public int updateZcUsers(ZcUsers zcUsers)
    {
        return zcUsersMapper.updateZcUsers(zcUsers);
    }

    /**
     * 批量删除租车用户
     *
     * @param userIds 需要删除的租车用户主键
     * @return 结果
     */
    @Override
    public int deleteZcUsersByUserIds(String userIds)
    {
        return zcUsersMapper.deleteZcUsersByUserIds(Convert.toStrArray(userIds));
    }

    /**
     * 删除租车用户信息
     *
     * @param userId 租车用户主键
     * @return 结果
     */
    @Override
    public int deleteZcUsersByUserId(Long userId)
    {
        return zcUsersMapper.deleteZcUsersByUserId(userId);
    }

    @Override
    public ZcUsers selectZcUsersByUser(String openId, String sk) {
        return zcUsersMapper.selectZcUsersByUser(openId, sk);
    }
}
